<?php


header("Content-type: text/html; charset=gbk");
$str=file_get_contents('http://www.zuowen.com/e/20160606/575551d2c7d29.shtml');
$mat="/<a (.*?)(.*?).shtml\">(.*?)<\/a>/s";
//<a (.*?)(.*?).shtml">(.*?)</a>
$c=preg_match_all($mat,$str,$res);
//var_dump($c);
var_dump($res);
//$x=strip_tags($res[1][0]);
//file_put_contents('./demo.txt',$x);

//$filename="./demo2.txt";
//
//$handle=fopen($filename,"a+");
//
//$str=fwrite($handle,$x);
//
//fclose($handle);